import type { PropType } from "vue";

// 按钮类型
export type ButtonType = 'primary' | 'success' | 'info' | 'warning' | 'danger'
// 按钮尺寸
export type ButtonSize = 'medium' | 'small' | 'mini'
// 原生按钮类型
export type NativeType = 'button' | 'submit' | 'reset'
// 定义button接接收的props类型
export const buttonProps = {
  type :{
    type: String as PropType<ButtonType>,
    default: 'primary'
  },
  size :{
    type: String as PropType<ButtonSize>,
    default: 'medium'
  },
  plain: {
    type: Boolean
  },
  round: {
    type: Boolean
  },
  circle: {
    type: Boolean
  },
  disabled: {
    type: Boolean
  },
  autofocus: {
    type: Boolean
  },
  loading: {
    type: Boolean
  },
  nativeType: {
    type: String as PropType<NativeType>,
    default: 'button'
  },
  icon: {
    type: String,
    default: ''
  }
}